package com.atshiyou.service.impl;

import com.atshiyou.bean.Student;
import com.atshiyou.dao.impl.StudentDaoImpl;
import com.atshiyou.service.StudentDaoService;

import java.util.List;

// Service主要的功能是调用dao里面的方法
public class StudentDaoServiceImpl implements StudentDaoService {

    StudentDaoImpl studentDao = new StudentDaoImpl();
    @Override
    public List<Student> findAll() {
        return studentDao.findAll();
    }

    @Override
    public boolean addStudent(Student student) {
        boolean b = studentDao.addStudent(student);
        return b;
    }

    @Override
    public boolean deleteStudent(int studentid) {
        boolean b = studentDao.deleteStudent(studentid);
        return b;
    }

    @Override
    public boolean alterStudent(int stuid, Student student) {
        boolean b = studentDao.alterStudent(stuid, student);
        return b;
    }
}
